<%= render layout: "shared/modal", locals: {
  title: t("group_members.update_member.Change member role"),
  button_text: icon_tag("change"),
  button_class: 'link-gray'
} do %>
  <div class="box-body overflow-auto">
    <%= form_with(model: member, url: group_member_path(@group, member), method: :put) do |form| %>
      <div class="form-group f6 mb-button">
        <%= form.label :role, class: "control-label" %>
        <% Member.role_options.each do |label, value| %>
        <div class="form-checkbox">
          <label>
            <input type="radio" name="member[role]" value="<%= value %>" <%= "checked" if member.role == value %> >
            <%= label %>
          </label>
        </div>
        <% end %>
      </div>
      <div class="form-actions float-right">
        <button class="btn btn-primary"><%= t("group_members.update_member.Update Role") %></button>
      </div>
    <% end %>
  </div>
<% end %>